using System;
using System.Collections;
using System.Collections.Generic;

namespace Com.CMS263.PO
{
	#region Good

	/// <summary>
	/// Good object for NHibernate mapped table 'Goods'.
	/// </summary>
	public class Good
	{
		#region Member Variables
		
		protected int _id;
		protected int _catId;
		protected string _goodsSn;
		protected string _goodsName;
		protected int _clickCount;
		protected int _brandId;
		protected string _providerName;
		protected int _goodsNumber;
		protected decimal _price;
		protected int _warnNumber;
		protected string _keyWords;
		protected string _goodsBrief;
		protected string _goodsDesc;
		protected string _goodsImg;
		protected bool _isSale;
		protected int _integral;
		protected DateTime _addDate;
		protected int _sortOrder;
		protected bool _isDelete;
		protected bool _isBest;
		protected bool _isNew;
		protected DateTime _lastDate;
		
		protected string _sellerNote;
		protected int _giveIntegral;
        protected IList<ProdGoodsAttr> prodgoodAttrList;

		#endregion

		#region Constructors

		public Good() { }

		public Good( int catId, string goodsSn, string goodsName, int clickCount, int brandId, string providerName, int goodsNumber, decimal price, int warnNumber, string keyWords, string goodsBrief, string goodsDesc, string goodsImg, bool isSale, int integral, DateTime addDate, int sortOrder, bool isDelete, bool isBest, bool isNew, DateTime lastDate, int goodsType, string sellerNote, int giveIntegral )
		{
			this._catId = catId;
			this._goodsSn = goodsSn;
			this._goodsName = goodsName;
			this._clickCount = clickCount;
			this._brandId = brandId;
			this._providerName = providerName;
			this._goodsNumber = goodsNumber;
			this._price = price;
			this._warnNumber = warnNumber;
			this._keyWords = keyWords;
			this._goodsBrief = goodsBrief;
			this._goodsDesc = goodsDesc;
			this._goodsImg = goodsImg;
			this._isSale = isSale;
			this._integral = integral;
			this._addDate = addDate;
			this._sortOrder = sortOrder;
			this._isDelete = isDelete;
			this._isBest = isBest;
			this._isNew = isNew;
			this._lastDate = lastDate;			
			this._sellerNote = sellerNote;
			this._giveIntegral = giveIntegral;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual int CatId
		{
			get { return _catId; }
			set { _catId = value; }
		}

		public  virtual string GoodsSn
		{
			get { return _goodsSn; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for GoodsSn", value, value.ToString());
				_goodsSn = value;
			}
		}

		public  virtual string GoodsName
		{
			get { return _goodsName; }
			set
			{
				if ( value != null && value.Length > 100)
					throw new ArgumentOutOfRangeException("Invalid value for GoodsName", value, value.ToString());
				_goodsName = value;
			}
		}

		public  virtual int ClickCount
		{
			get { return _clickCount; }
			set { _clickCount = value; }
		}

		public  virtual int BrandId
		{
			get { return _brandId; }
			set { _brandId = value; }
		}

		public  virtual string ProviderName
		{
			get { return _providerName; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for ProviderName", value, value.ToString());
				_providerName = value;
			}
		}

		public  virtual int GoodsNumber
		{
			get { return _goodsNumber; }
			set { _goodsNumber = value; }
		}

		public  virtual decimal Price
		{
			get { return _price; }
			set { _price = value; }
		}

		public  virtual int WarnNumber
		{
			get { return _warnNumber; }
			set { _warnNumber = value; }
		}

		public  virtual string KeyWords
		{
			get { return _keyWords; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for KeyWords", value, value.ToString());
				_keyWords = value;
			}
		}

		public  virtual string GoodsBrief
		{
			get { return _goodsBrief; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for GoodsBrief", value, value.ToString());
				_goodsBrief = value;
			}
		}

		public  virtual string GoodsDesc
		{
			get { return _goodsDesc; }
			set
			{				
				_goodsDesc = value;
			}
		}

		public  virtual string GoodsImg
		{
			get { return _goodsImg; }
			set
			{
				if ( value != null && value.Length > 100)
					throw new ArgumentOutOfRangeException("Invalid value for GoodsImg", value, value.ToString());
				_goodsImg = value;
			}
		}

		public  virtual bool IsSale
		{
			get { return _isSale; }
			set { _isSale = value; }
		}

		public  virtual int Integral
		{
			get { return _integral; }
			set { _integral = value; }
		}

		public  virtual DateTime AddDate
		{
			get { return _addDate; }
			set { _addDate = value; }
		}

		public  virtual int SortOrder
		{
			get { return _sortOrder; }
			set { _sortOrder = value; }
		}

		public  virtual bool IsDelete
		{
			get { return _isDelete; }
			set { _isDelete = value; }
		}

		public  virtual bool IsBest
		{
			get { return _isBest; }
			set { _isBest = value; }
		}

		public  virtual bool IsNew
		{
			get { return _isNew; }
			set { _isNew = value; }
		}

		public  virtual DateTime LastDate
		{
			get { return _lastDate; }
			set { _lastDate = value; }
		}

	

		public  virtual string SellerNote
		{
			get { return _sellerNote; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for SellerNote", value, value.ToString());
				_sellerNote = value;
			}
		}

		public  virtual int GiveIntegral
		{
			get { return _giveIntegral; }
			set { _giveIntegral = value; }
        }
        public virtual IList<ProdGoodsAttr> ProdgoodAttrList
        {
            get { return prodgoodAttrList; }
            set { prodgoodAttrList = value; }
        }

		

		#endregion
	}
	#endregion
}